import request from "@/utils/request";
import defaultSettings from "@/settings";

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/list`,
  exportUrl: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/list`,
  delUrl: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/delete`,
}

export function save(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/save`,
    method: 'post',
    data: data
  })
}

export function get(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/get`,
    method: 'get',
    params: data
  })
}

export function update(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/update`,
    method: 'post',
    data: data
  })
}

export function del(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/delete`,
    method: 'post',
    data: {
      ids: data
    }
  })
}

export function queryAllExecutor() {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/queryAllExecutor`,
    method: 'get',
  })
}

export function checkExecutorCodeUnique(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/checkExecutorCodeUnique`,
    method: 'post',
    data
  })
}

export function checkExecutorNameUnique(data) {
  return request({
    url: `${defaultSettings.ctx.batchApp}/s/scubeExecutor/checkExecutorNameUnique`,
    method: 'post',
    data
  })
}
